package org.longteng.mobileluck.algorithm.bean;

import com.univocity.parsers.annotations.Parsed;

/**
 * 好车牌号表,直接读入csv表src/main/resources/table/good_plate_number.csv
 * @author hymn.com
 */
public class GoodPlateNumTable {

    /**好号*/
    @Parsed(field = "好号")
    protected String goodNum;

    /**
     * 是否符合前缀的号码
     * @param prefix
     * @return
     */
    public boolean startsWith(String prefix) {
        boolean isPrefix = false;
        if(goodNum != null) {
            isPrefix = prefix == null ? true : goodNum.startsWith(prefix);
        }

        return isPrefix;
    }

    public String getGoodNum() {
        return goodNum;
    }
    public void setGoodNum(String goodNum) {
        this.goodNum = goodNum;
    }

    @Override
    public String toString() {
        return "GoodPlateNumTable{" +
                "goodNum=" + goodNum +
                '}';
    }
}
